m2dl <- readRDS("Work/m2dl_forJAGS.rds")

main2.1946.jags.params <- c("b")

main2.1946.jags.inits <- list(list(b = rep(0, 13)),
                              list(b = rep(0, 13)),
                              list(b = rep(0, 13)),
                              list(b = rep(0, 13)))

library("dclone")

cl <- makePSOCKcluster(4)
main2.1946.fitjags.par <- jags.parfit(cl = cl,
                                      data = m2dl,
                                      params = main2.1946.jags.params,
                                      model = "m2_jags.jags",
                                      inits = main2.1946.jags.inits,
                                      n.chains = 4,
                                      n.iter = 10000, n.burnin = 2000, n.thin = 10)

saveRDS(main2.1946.fitjags.par, file = "Work/main2jags1946.rds")
